package net.lahuobao.mall.controller.admin;

import net.lahuobao.mall.service.admin.MallProjectEmployeeServiceI;
import org.jeecgframework.core.common.controller.BaseController;
import org.jeecgframework.core.common.model.json.DataGrid;
import org.jeecgframework.tag.core.easyui.TagUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Map;

/**
 * Created by Lenovo on 2017/3/22.
 */
@Controller
@RequestMapping("/mallProjectEmployeeController")
public class MallProjectEmployeeController extends BaseController {
    @Autowired
    private MallProjectEmployeeServiceI mallProjectEmployeeService;

    @RequestMapping(params = "chooseList")
    public ModelAndView projects(HttpServletRequest request) {
        ModelAndView mv = new ModelAndView("net/lahuobao/mall/admin/associatedPersonsChooseList");
        return mv;
    }

    @RequestMapping(params = "chooseDatagrid")
    public void projectChooseList(HttpServletRequest request, HttpServletResponse response, DataGrid dataGrid) {
        Map<String, Object> map = getPageQueryMap(request, dataGrid);
        mallProjectEmployeeService.selectAssociatedPerson(map, dataGrid);
        TagUtil.datagrid(response, dataGrid);
    }
}
